package com.imti.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.entity.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * (Account)表数据库访问层
 *
 * @author makejava
 * @since 2023-01-31 11:25:39
 */
@Mapper
public interface AccountDao extends BaseMapper<Account> {

    /**
     * 注册
     * @param account
     * @return
     */
 @Insert("insert into account(acc_phone,acc_id_card,acc_pswd) values(#{accPhone},#{accIdCard},MD5(#{accPswd}))")
 public int register(Account account);

    /**
     * 登录
     */
 @Select("select acc_phone from account where  acc_phone=#{accPhone}")
 public Account login(String accPhone);

}

